From: Roger Pau Monné Date: Thu, 1 Apr 2021 14:41:48 +0000 (+0200) Subject: x86/vioapic: top word redir entry writes don't trigger interrupts X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~776 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=6f59dc12962be61ef84774d0630bdb7c1050851f;p=xen.git x86/vioapic: top word redir entry writes don't trigger interrupts Top word writes just update the destination of the interrupt, but since there's no change on the masking or the triggering mode no guest interrupt injection can result of such write. Add an assert to that effect. Requested-by: Jan Beulich Signed-off-by: Roger Pau Monné Acked-by: Jan Beulich --- diff --git a/xen/arch/x86/hvm/vioapic.c b/xen/arch/x86/hvm/vioapic.c index 804bc77279..e3ee747b7d 100644 --- a/xen/arch/x86/hvm/vioapic.c +++ b/xen/arch/x86/hvm/vioapic.c @@ -262,6 +262,8 @@ static void vioapic_write_redirent( !ent.fields.remote_irr && hvm_irq->gsi_assert_count[gsi] ) { + /* A top word write should never trigger an interrupt injection. */ + ASSERT(!top_word); pent->fields.remote_irr = 1; vioapic_deliver(vioapic, idx); }